:root {
  --editorBgColor: transparent;
}

div[id^='ag-editor-id'] {
  // 正文行高
  --text-line-height: 28px;
  // 正文字号
  --text-font-size: 16px;
  // 正文字体颜色
  --text-font-color: #333333;
  // 正文字体
  --text-font-family: 'Open Sans', 'Noto Sans SC', Menlo, "Ubuntu Mono", Consolas, "Courier New", "Microsoft Yahei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
  // 段落下边距
  --p-margin-bottom: 20px;
  // 引用背景
  --blockquote-background: inherit;
  // 引用边框颜色
  --blockquote-border-color: #d8d8d8;
  // 引用字体颜色
  --blockquote-font-color: #aaa;
  // 超链接字体颜色
  --link-font-color: #448aff;
  --ir-bracket-color: #448aff;
  // 粗体字体
  --bold-font-family: 'Open Sans', 'Noto Sans SC', Menlo, "Ubuntu Mono", Consolas, "Courier New", "Microsoft Yahei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;

  @media (prefers-color-scheme: dark) {
    --panel-background-color: transparent;
    --text-font-color: #f0f0f0;
    --blockquote-border-color: #555;
    --blockquote-font-color: #969696;
    --blockquote-background: none repeat scroll 0 0 rgba(51,51,51,.5);
  }

  @mixin hStyle {
    margin: 32px 0 20px;
    font-weight: normal;
    letter-spacing: 1px;
    font-family: var(--bold-font-family);
    color: var(--text-font-color);
    &::before {
      cursor: pointer;
    }
  }

  padding: 0 40px 30px;
  --panel-background-color: transparent;
  line-height: var(--text-line-height);
  font-size: var(--text-font-size);
  color: var(--text-font-color);
  font-family: var(--text-font-family);

  & > h1 {
    font-size: 2em;
    line-height: 1.375;
    border: none;
    @include hStyle;
  }
  & > h2 {
    font-size: 1.75em;
    line-height: 1.428;
    border: none;
    @include hStyle;
  }
  & > h3 {
    font-size: 1.5em;
    line-height: 1.5;
    @include hStyle;
  }
  & > h4 {
    font-size: 1.25em;
    line-height: 1.6;
    @include hStyle;
  }
  & > h5 {
    font-size: 1em;
    line-height: 1.75;
    @include hStyle;
  }
  & > h6 {
    font-size: 1em;
    line-height: 1.75;
    color: #aaaaaa;
    @include hStyle;
  }

  a {
    color: var(--link-font-color);
    line-height: var(--text-line-height);
  }

  blockquote {
    padding: 0 1em;
    line-height: var(--text-line-height);

    &::before {
      width: .25em;
      left: 0;
      background: var(--blockquote-border-color);
    }
  }

  & > .ag-paragraph {
    margin-bottom: var(--p-margin-bottom);
  }

  span code,
  td code,
  th code,
  code,
  code[class*="language-"],
  .CodeMirror,
  pre.ag-paragraph {
    font-size: 0.875em;
  }

  // 屏蔽table工具栏
  figure.ag-active .ag-tool-table.ag-tool-bar,
  table.ag-active tr .ag-drag-handler.left,
  table.ag-active tr .ag-drag-handler.bottom {
    display: none;
  }
  .ag-table-scroll {
    padding-left: 0;
    /* padding-bottom: 0; */
  }
}

div.ag-show-quick-insert-hint p.ag-paragraph.ag-active > span.ag-paragraph-content:first-of-type:empty::after {
  content: 'input + to insert';
}
